package com.iocollege.tinyframe.mapper.system;

import com.iocollege.tinyframe.common.core.MyMapper;
import com.iocollege.tinyframe.entity.system.SysUser;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 用户信息表 Mapper 接口
 * </p>
 *
 * @author 关注公众号：MarkerHub
 * @since 2021-03-22
 */
public interface SysUserMapper extends MyMapper<SysUser> {


    @Update("update sys_user set password = #{password} where user_name = #{userName}")
    int resetUserPwd(String userName, String password);

    @Update("update sys_user set avatar = #{avatar} where user_name = #{userName}")
    boolean updateUserAvatar(String userName, String avatar);

    @Update("update sys_user set status = #{status} where id = #{id}")
    int updateUserStatus(SysUser user);
}
